package org.grayrabbit.cloud.utils.logger;

public class Logger{
	
	private LoggerWrapper logger = null;
	
	protected Logger(String name){	
		logger = new LoggerWrapper(name);
	}
	
	public static Logger getLogger(String name){
		return new Logger(name);
	}
	
	public static Logger getLogger(Class<?> clazz){
		return new Logger(clazz.getName());
	}
	
	public void debug(Object message){		
		if(logger!=null)	logger.debug(message);		
	}
	
	public void debug(Object message, Throwable t){		
		if(logger!=null)	logger.debug(message,t);	
	}
	
	public void error(Object message){		
		if(logger!=null)	logger.error(message);	
	}
	
	public void error(Object message, Throwable t){		
		if(logger!=null)	logger.error(message,t);
	}
	
	public void fatal(Object message){		
		if(logger!=null)	logger.fatal(message);
	}
	
	public void fatal(Object message, Throwable t){		
		if(logger!=null)	logger.fatal(message,t);
	}
	
	public void info(Object message){		
		if(logger!=null)	logger.info(message);
	}
	
	public void info(Object message, Throwable t){		
		if(logger!=null)	logger.info(message,t);
	}
	
	public void warn(Object message){		
		if(logger!=null)	logger.warn(message);
	}
	
	public void warn(Object message, Throwable t){		
		if(logger!=null)	logger.warn(message,t);
	}
	
		
}
